package com.hspedu.dao_.domain;

import java.time.LocalDateTime;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/4/11
 * @time 17:49
 */
public class Actor {
    private Integer id;

    private String name;
    /**
     * 在MySQL中，char是固定长度的**字符串**
     */
    private String sex;
    private LocalDateTime borndate;
    private String phone;

    /**
     * 反射时 Class 类调用的 newInstance方法就是使用的无参构造器
     * 一些框架底层会使用到 newInstance方法
     * 所以无参构造要及时给上
     */
    public Actor() {
    }

    public Actor(Integer id, String name, String sex, LocalDateTime borndate, String phone) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.borndate = borndate;
        this.phone = phone;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public LocalDateTime getBorndate() {
        return borndate;
    }

    public void setBorndate(LocalDateTime borndate) {
        this.borndate = borndate;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "Actor{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", borndate=" + borndate +
                ", phone='" + phone + '\'' +
                '}';
    }
}
